//
//  MovableObject.h
//  Soccer
//
//  Created by Hyun-Woong Kim on 09. 04. 29.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"
#import "Object.h"

static const double kPi = 3.1415927;
static const double kRad2Deg = 180. / 3.1415927;

/**
 MovableObject
*/
@interface MovableObject : Object
{
	// 축구장 전체에서 봤을 때의 위치 값, OpenGL Coordinate
	CGPoint position;
	CGPoint prevPosition;
	double dirRad;
	int speed;
	BOOL isMoving;
}

@property CGPoint position;
@property CGPoint prevPosition;
@property double dirRad;
@property int speed;
@property BOOL isMoving;

- (id)initWithPosition:(CGPoint)position;
- (id)initWithPosition:(CGPoint)pos dirRad:(double)rad speed:(int)sp;
// 다음 위치를 정하는 시점은 언제인가? 일단은 Sprite가 다음 위치를 요청할 때 마다
- (void)moveToNextPosition;
- (CGPoint)checkOutline:(CGPoint)pos;
- (double)getDistanceFrom:(CGPoint)point1 To:(CGPoint)point2;

@end
